package com.jeff.android.lab.architecture.mvp;

import com.jeff.android.lab.architecture.mvp.base.BaseMvpPresenter;

public class LoginPresenter extends BaseMvpPresenter<LoginContract.IView> implements LoginContract.IPresenter {

    private LoginContract.IModel mLoginModel;

    public LoginPresenter() {
        this.mLoginModel = new LoginModel();
    }

    @Override
    public void login() {
        mView.showLoading();
        mLoginModel.login(new LoginModel.Callback() {
            @Override
            public void onSuccess() {
                mView.setLoginState();
                mView.hideLoading();
            }

            @Override
            public void onFail() {

            }
        });
    }

}
